﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Lottery.MediaData.Core {
    /// <summary>
    /// 大中小
    /// </summary>
    public class DZX {
        /// <summary>
        /// 大
        /// </summary>
        public string D { get; set; }

        /// <summary>
        /// 中
        /// </summary>
        public string Z { get; set; }

        /// <summary>
        /// 小
        /// </summary>
        public string X { get; set; }

        /// <summary>
        /// 预测奖号
        /// </summary>
        public string PreNumber { get; set; }

        /// <summary>
        /// 预测奖号的大中小
        /// </summary>
        public string PreNumberDZX {
            get {
                if (PreNumber == string.Empty) return string.Empty;

                if (PreNumber == "310") {
                    return "大";
                }

                if (D.IndexOf(PreNumber) != -1) {
                    return "大";
                }
                if (Z.IndexOf(PreNumber) != -1) {
                    return "中";
                }
                if (PreNumber == X) {
                    return "小";
                }

                return string.Empty;
            }
        }

        /// <summary>
        /// 3
        /// </summary>
        public int Three { get; set; }

        /// <summary>
        /// 1
        /// </summary>
        public int One { get; set; }

        /// <summary>
        /// 0
        /// </summary>
        public int Zero { get; set; }

        /// <summary>
        /// 预测文字。
        /// 存在如下情况：PreText不为空，当时PreNumber为空。
        /// 例如：Three == 19, One == 19, Zero == 2
        ///       PreText == '小'
        ///       则 PreNumber == string.Empty
        /// </summary>
        public string PreText { get; set; }
    }
}
